
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
    mode:'history',
    routes: [
        {
            path: '/',
            redirect: '/index'
        },
        {
            path: '/index',
            name: 'Index',
            meta: { isMainPage: true }, //主页面
            component: () => import('@/views/home/Index.vue'),
        },
        {
            path: '/canvas',
            name: 'Canvas',
            meta: { isMainPage: true }, //主页面
            component: () => import('@/views/Canvas.vue'),
        },
        // 拖拽组件
        {
            path: '/drag',
            name: 'Drag',
            component: () => import('@/views/Drag.vue')
        },
        // 瀑布流
        {
            path: '/waterfall',
            name: 'Waterfall',
            component: () => import('@/views/Waterfall.vue')
        },
        // 环形进度条
        {
            path: '/circle',
            name: 'Circle',
            component: () => import('@/views/Circle.vue')
        },
        // 图标组件
        {
            path: '/echart',
            name: 'Echart',
            component: () => import('@/views/echarts/Echart.vue')
        },
        // 疫情地图
        {
            path: '/echartmap',
            component: () => import('@/views/echarts/Map.vue')
        },
        // 亚洲地图
        {
            path: '/asiamap',
            component: () => import('@/views/echarts/AsiaMap.vue')
        },
        // 滚动组件
        {
            path: '/scroll',
            name: 'VueScroll',
            component: () => import('@/views/scroll/VueScroll.vue')
        },
        // vant滚动组件
        {
            path: '/vscroll',
            name: 'VScroll',
            component: () => import('@/views/scroll/VScroll.vue')
        },
        // better-scroll滚动插件
        {
            path: '/bscroll',
            name: 'BScroll',
            component: () => import('@/views/scroll/Scroll.vue')
        },
        // uploadvideo
        {
            path: '/uploadvideo',
            name: 'Uploadvideo',
            component: () => import('@/views/Uploadvideo.vue')
        },
        // css
        {
            path: '/css',
            name: 'Css',
            component: () => import('@/views/Css.vue')
        },
        // websocket
        {
            path: '/websocket',
            name: 'Websocket',
            component: () => import('@/views/Websocket.vue')
        },
        // iframe
        {
            path: '/iframe',
            name: 'Iframe',
            component: () => import('@/views/Iframe.vue')
        },
        // $bus事件
        {
            path: '/bus',
            name: 'Bus',
            component: () => import('@/views/global/Bus.vue')
        },
        {
            path: '/busone',
            name: 'busone',
            component: () => import('@/views/global/busone.vue')
        },
        {
            path: '/bustwo',
            name: 'bustwo',
            component: () => import('@/views/global/bustwo.vue')
        },
        // 全局数据globaldata
        {
            path: '/global',
            name: 'Global',
            component: () => import('@/views/global/Global.vue')
        },
        // 全局数据globaldata
        {
            path: '/globaldata',
            name: 'Globaldata',
            component: () => import('@/views/global/globaldata.vue')
        },
        // keepAlive缓存组件
        {
            path: '/keepalive',
            name: 'keepAlive',
            component: () => import('@/views/KeepAlive.vue')
        },
        // 渐进式图像加载
        {
            path: '/progressimg',
            name: 'ProgressImg',
            component: () => import('@/views/ProgressImg.vue')
        },
        // 上下轮播组件
        {
            path: '/rollscreen',
            name: 'Rollscreen',
            component: () => import('@/views/scroll/Rollscreen.vue')
        },
        // 水波指令
        {
            path: '/waves',
            name: 'Waves',
            component: () => import('@/views/Waves.vue')
        },
        // 键盘
        {
            path: '/passwordinput',
            name: 'Passwordinput',
            component: () => import('@/views/Passwordinput.vue')
        },
        // 数字滚动
        {
            path: '/odometer',
            name: 'IOdometer',
            component: () => import('@/views/Odometer.vue')
        },
        // vant密码键盘
        {
            path: '/vantkeyboard',
            component: () => import('@/views/VantPassword.vue')
        },
        // vant顶部导航切换组件
        {
            path: '/vanttabs',
            component: () => import('@/views/tabs/Tabs.vue')
        },
        // 自动生成表单
        {
            path: '/form',
            component: () => import('@/views/form/index.vue')
        },
        // 组织架构图
        {
            path: '/tree',
            component: () => import('@/views/tree/index.vue')
        },
        // 递归组件tree
        {
            path: '/customtree',
            component: () => import('@/views/tree/customtree.vue')
        },
        // 卡片类似即刻
        {
            path: '/swing',
            component: () => import('@/views/swing/index.vue')
        },
        // lottie动画
        {
            path: '/lottie',
            component: () => import('@/views/Lottie.vue')
        },
        // 骨架屏幕
        {
            path: '/skeleton',
            component: () => import("@/views/Skeleton.vue")
        },
        // 腾讯地图
        {
            path: '/txmap',
            component: () => import("@/views/map/TxMap.vue")
        },
        // 裁剪头像
        {
            path: '/crop',
            component: () => import("@/views/Crop.vue")
        },
        // 视频播放器
        {
            path: '/dplayer',
            component: () => import("@/views/video/Dplayer.vue")
        },
        // 视频播放器
        {
            path: '/vuedplayer',
            component: () => import("@/views/video/vueDplayer.vue")
        },
        // 视频播放器
        {
            path: '/xgplayer',
            component: () => import("@/views/video/XGPlayer.vue")
        },
         // 视频播放器
        {
            path: '/print',
            component: () => import("@/views/print/Print.vue")
        },
         // 腾讯云验证码
        {
            path: '/captcha',
            component: () => import("@/views/captcha/Captcha.vue")
        },
         // 聊天websocket
        {
            path: '/chat',
            component: () => import("@/views/chat/websocket.vue")
        },
        // 漫画
        {
            path: '/manhua',
            component: () => import("@/views/manhua/index.vue")
        },
        // 漫画
        {
            path: '/vuesax',
            component: () => import("@/views/vuesax/index.vue")
        },
        // 测试页
        {
            path: '/test',
            name: 'Test',
            component: () => import('@/views/test/index.vue')
        },
        // 测试页
        {
            path: '/testcolor',
            name: 'testcolor',
            component: () => import('@/views/test/color.vue')
        },
        // 404页面
        {
            path: '/404',
            name: '404',
            component: () => import('@/views/notFound.vue')
        },
        {
            path: '*', // 此处需特别注意至于最底部  
            redirect: '/404'
        }

    ]
})